// Copyright 2015 Quuppa Oy. All rights reserved.
var Q = Q || {};
Q.NotificationManager = function() {
	$("#notificationBar").hide();
};

Q.NotificationManager.prototype.showNotification = function(msg, howLong) {
	$("#notificationBar").html(msg).show();
	setTimeout(function() {
		$("#notificationBar").fadeOut();
	}, howLong || 2000);
};

//-----------------------------

Q.ZoneAlarm = function() {
	$("#alarmBox_1").hide();
};

Q.ZoneAlarm.prototype.showNotification = function(msg, howLong, line) {
	
	var div = document.getElementById('alarmBox_1');

	var h = line * 25 + 50;
	div.style.height = h+"px";

	$("#alarmBox_1").html(msg).show();
	setTimeout(function() {
		$("#alarmBox_1").fadeOut(1);
	}, howLong || 2000);
};

Q.ZoneAlarm.prototype.resize = function(line){
}

//-----------------------------

Q.KeyAlarm = function() {
	$("#alarmBox_2").hide();
};

Q.KeyAlarm.prototype.showNotification = function(msg, howLong, line) {

	var div = document.getElementById('alarmBox_2');

	var h = line * 25 + 25;
	div.style.height = h+"px";
	div.style.top = 300+"px";

	$("#alarmBox_2").html(msg).show();

	setTimeout(function() {
		$("#alarmBox_2").fadeOut();
	}, howLong || 2000);

};
Q.KeyAlarm.prototype.resetop = function() {
	//alert($(#alarmBox_1).height());
};











//-----------------------------

Q.AlarmManager_3 = function() {
	$("#AlarmBox_3").hide();
};

Q.AlarmManager_3.prototype.showNotification = function(msg, howLong) {
	$("#AlarmBox_3").html(msg).show();
	setTimeout(function() {
		$("#AlarmBox_3").fadeOut();
	}, howLong || 2000);
};
